<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html>
<html lang="fr">
	<head>
		<title>Bitstrip(s) - Connexion</title>
		<meta charset="UTF-8"/>
		<link rel="stylesheet" type="text/css" href="/bitstrip/assets/css/login.css"/>
        <link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
	</head>
	<body>
        
        <div id="fb-root"></div>
        
        <c:if test="${just_signed_up == true}">
        	<div class="message-box show">Votre inscription a bien été enregistrée.<br/>Vous pouvez maintenant vous connecter !</div>
       	</c:if>
       	
        <c:if test="${not empty SPRING_SECURITY_LAST_EXCEPTION.message}">
            <div class="message-box error show">
                <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>
            </div>
            <c:remove var = "SPRING_SECURITY_LAST_EXCEPTION" scope="session" />        
        </c:if>
        
		<div class="login-container">  
			<h1>BITSTRIP(s)</h1>
            
            <form id="login-form" action="<c:url value="j_spring_security_check"/>" method="post">
				<fieldset>
					<input type="text" id="email" name="j_username" placeholder="${not empty param.login_error ? SPRING_SECURITY_LAST_USERNAME : "ADRESSE E-MAIL"}"/>
					<input type="password" placeholder="*********" id="password"name="j_password" />
				    
                    <div class="bottom-form">
                       <a tabindex="2" class="button" href="/bitstrip/inscription">Créer un compte utilisateur</a>
					   <input tabindex="1" name="submit" type="submit" class="validate-btn" value="Connexion" />
				    </div>
                </fieldset> 
			</form>
            <hr class="separator" />
            <a href="#" class="fb-login"></a>
		</div>
		 
        <script type="text/javascript">
        (function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) return;
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/fr_FR/all.js#xfbml=1&appId=200834466782016";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));
        </script>
        
		<script type="text/javascript" src="/bitstrip/assets/js/jquery-2.0.3.min.js"></script>
		<script type="text/javascript" src="/bitstrip/assets/js/jquery-ui-1.10.4.custom.min.js"></script>
		<script src="https://www.dropbox.com/static/api/dropbox-datastores-1.0-latest.js" type="text/javascript"></script>
		<script type="text/javascript" src="/bitstrip/assets/js/script.js"></script>
                                              
	</body>
</html>

